package HomeWork;
/*
 *@auther will
 *@version 1.0
 */

public class Homework07 {
    public static void main(String[] args) {
        Car car = new Car(32.2);
        car.f1();
    }
}

class Car{
    private  double temperature;

    public Car(double temperature) {
        this.temperature = temperature;
    }

    public void f1(){
        class Air{
            public void flow(){
                if(temperature>=40){
                    System.out.println("太热了，吹冷风");
                }
                else if(temperature<0){
                    System.out.println("太冷了，吹热风");
                }
                else {
                    System.out.println("温度合适，关闭空调");
                }
            }
        }
        Air air = new Air();
        air.flow();
    }
}